Skip to content

fix: L1 cosmenticFlags rename, H10 panic fix, L2 .hawk cwd-leak - #51

Merged
Patel230 merged 3 commits into
mainfrom
fix/l1-l2-h10-2026-06
Jun 17, 2026
Merged

fix: L1 cosmenticFlags rename, H10 panic fix, L2 .hawk cwd-leak#51
Patel230 merged 3 commits into
mainfrom
fix/l1-l2-h10-2026-06

Conversation

@Patel230

@Patel230 Patel230 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Three no-decision deferred items from the post-merge cleanup plan:

  • L1: rename cosmenticFlagscosmeticFlags in internal/permissions/canonicalize.go
  • H10: replace unsafe node.(ast.Expr) with comma-ok form in internal/engine/semantic_diff.go:formatNode to prevent panic on non-Expr nodes (e.g. *ast.Comment)
  • L2: resolve os.UserHomeDir() + "/.hawk/" for the four state-store default paths so state stops leaking into <cwd>/cmd/.hawk/ when hawk is run from its own source tree

Test plan

  • L1: rg cosmenticFlags hawk/ returns zero
  • H10: go test ./internal/engine/... includes new formatNode test that calls it with &ast.Comment{...} and asserts "unknown"
  • L2: new regression test asserts each of the four state-store default paths is absolute and starts with os.UserHomeDir()
  • gofmt / gofumpt clean
  • go vet ./... clean
  • go test ./internal/... green

@Patel230 Patel230 changed the title test fix: L1 cosmenticFlags rename, H10 panic fix, L2 .hawk cwd-leak Jun 17, 2026
@Patel230
Patel230 marked this pull request as ready for review June 17, 2026 14:51
@Patel230
Patel230 merged commit 87b7e1c into main Jun 17, 2026
18 checks passed
@Patel230
Patel230 deleted the fix/l1-l2-h10-2026-06 branch June 17, 2026 15:14
Patel230 added a commit that referenced this pull request Jun 18, 2026
* fix(permissions): rename cosmenticFlags to cosmeticFlags (L1)

* fix(engine): use comma-ok form in formatNode to avoid panic on non-Expr nodes (H10)

* fix(state): resolve .hawk/ paths to home dir to stop cwd-leak (L2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant